<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div {
            position: relative;
            width: 100px;
            height: 100px;
            border: 1px solid black;
            background-color: red;
            animation-name: mymove;
            animation-duration: 2s;
            animation-timing-function: linear;
            animation-direction: normal;
            animation-iteration-count: infinite;
        }

        @keyframes mymove {
            0% {
                top: 100px;
                left: 100px;
                transform: rotate(0deg);
            }
            25%{
                top: 100px;
                left: 300px;
                transform: rotate(90deg);
            }
            50%{
                top: 300px;
                left: 300px;
                transform: rotate(180deg);
            }
            75%{
                top: 300px;
                left: 100px;
                transform: rotate(270deg);
            }
            100%{
                top: 100px;
                left: 100px;
                transform: rotate(360deg);
            }
        }
    </style>
</head>
<body>
<div></div>
</body>
</html>